/*
 * File Name: AppConfiguration.java
 * Created on: 
 */

package co.edu.uniandes.intercon.client.gui.common.window;

import java.awt.BorderLayout;
import java.awt.GridLayout;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

import co.edu.uniandes.intercon.client.gui.util.IconHelper;
import co.edu.uniandes.intercon.client.gui.util.WindowHelper;

/**
 * Window used to show general information about the author
 * 
 * @author Fabian Gutierrez [fagossa@gmail.com]
 */
@SuppressWarnings("serial")
public class AboutWindow extends JDialog {
    
    /**
     * Creates an about window of the predefined
     * @param parent
     */
    public AboutWindow(JFrame parent) {
        super(parent);
        setTitle("About");
        setSize(380, 250);
        setResizable(true);
        setModal(true);
        initGUI();
        WindowHelper.centerWindow(this);
    }
    
    /*
     * Inits panels
     */
    private void initGUI() {
        getContentPane().setLayout(new BorderLayout());
    
        JPanel panelPrincipal = new JPanel();
        getContentPane().add(panelPrincipal, BorderLayout.CENTER);
        
        JPanel panelImg = new JPanel();
        JLabel image = new JLabel("");
        image.setIcon(IconHelper.MYSELF_ICON);
        panelImg.add(image, BorderLayout.CENTER);
        panelPrincipal.add(panelImg, BorderLayout.WEST);        
        
        JPanel panel = new JPanel();
        panel.setLayout(new GridLayout(4, 2));
        panel.add(new JLabel("Application: "));
        panel.add(new JLabel("P2P Demo"));
        
        panel.add(new JLabel("Developers:"));
        panel.add(new JLabel("Fabian Gutierrez,Diana Ortega"));
        
        panel.add(new JLabel("Mail:"));
        panel.add(new JLabel("[fagossa@gmail.com]"));
        
        panel.add(new JLabel("Java:"));
        panel.add(new JLabel("1.5.0_14"));
        getContentPane().add(panel, BorderLayout.NORTH);        
        panelPrincipal.add(panel, BorderLayout.NORTH);
    }
    
}
